//
//  LWComposeButton.swift
//  Microblog
//
//  Created by Roman on 17/1/13.
//  Copyright © 2017年 Roman. All rights reserved.
//

import UIKit

let composeBtnW: CGFloat = 80
let composeBtnH: CGFloat = 110


class LWComposeButton: UIButton {
    override init(frame: CGRect) {
        super.init(frame: frame)
        //设置初始值和文字颜色
        titleLabel?.font = UIFont.systemFont(ofSize: 14)
        titleLabel?.textAlignment = .center
        //设置文字颜色
        setTitleColor(UIColor.darkGray, for: .normal)
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }

    override func titleRect(forContentRect contentRect: CGRect) -> CGRect {
        return CGRect(x: 0, y: composeBtnW, width: composeBtnW, height: composeBtnH - composeBtnW)
    }
    
    override func imageRect(forContentRect contentRect: CGRect) -> CGRect {
        return CGRect(x: 0, y: 0, width: composeBtnW, height: composeBtnW)
    }

}
